package com.bootdo.text;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

public class ThreadDemo extends Thread {

    public static void main(String[] args) {
        System.out.println("你好");
       //线程池训练计划
    //
//        ExecutorService executorService = Executors.newCachedThreadPool();
//        executorService.execute(new Runnable() {
//            @Override
//            public void run() {
//                System.out.println("zhixing");
//            }
//        });
//        executorService.shutdown();
//
//
//        ExecutorService singleThreadExecutor = Executors.newSingleThreadExecutor();
//        singleThreadExecutor.execute(new Runnable() {
//            @Override
//            public void run() {
//                System.out.println("hhh ");
//            }
//        });
//        singleThreadExecutor.shutdown();
//
//        ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(3);
//
//        scheduledExecutorService.execute(new Runnable() {
//            @Override
//            public void run() {
//                System.out.println("你好");
//            }
//        });
        int h;
            System.out.println((h = "key".hashCode()) ^ (h >>> 16));
        
//        ^与运算，>>>无符号右移运算
    }

    @Override
    public void run() {

        System.out.println("运行了");
        super.run();
    }
}
